//
//  JMImagePickerViewController.h
//  ImagePicker
//
//  Created by Jamin on 2018/10/15.
//  Copyright © 2018 jamin. All rights reserved.
//

#import <UIKit/UIKit.h>


@import Photos;

@protocol JMImagePickerViewControllerDelegate;
@interface JMImagePickerViewController : UINavigationController

@property (nonatomic, strong) NSMutableArray *selectedAssets;
@property (nonatomic, weak) id <JMImagePickerViewControllerDelegate> pickerDelegate;

+ (instancetype)defImagePickerViewController;

- (void)dismiss:(id)sender;
- (void)finishPickingAssets:(id)sender;


@end


@protocol JMImagePickerViewControllerDelegate <NSObject>
@optional

- (void)jmip_imagePickerViewController:(JMImagePickerViewController *)picker
                didFinishPickingAssets:(NSArray *)assets;

- (void)jmip_imagePickerViewController:(JMImagePickerViewController *)picker
                didFinishPickingPhotos:(NSArray<UIImage *> *)photos
                                assets:(NSArray <PHAsset *>*)assets
                         originalPhoto:(BOOL)originalPhoto;


- (void)jmip_imagePickerViewControllerDidCancel:(JMImagePickerViewController *)picker;

- (BOOL)jmip_imagePickerViewController:(JMImagePickerViewController *)picker shouldEnableAsset:(PHAsset *)asset;

- (BOOL)jmip_imagePickerViewController:(JMImagePickerViewController *)picker shouldSelectAsset:(PHAsset *)asset;
- (void)jmip_imagePickerViewController:(JMImagePickerViewController *)picker didSelectAsset:(PHAsset *)asset;
- (BOOL)jmip_imagePickerViewController:(JMImagePickerViewController *)picker shouldDeselectAsset:(PHAsset *)asset;
- (void)jmip_imagePickerViewController:(JMImagePickerViewController *)picker didDeselectAsset:(PHAsset *)asset;

@end
